package com.jb.faces.application;

public class FacesMessage {
    public static Severity SEVERITY_FATAL = new Severity(1);
    public static Severity SEVERITY_ERROR = new Severity(2);
    Object owner;
    Severity severity;
    String details;

    public FacesMessage(String details) {
        this.details = details;
    }

    public FacesMessage(String compId, String details) {
        this.details = details;
    }

    public FacesMessage(Severity severity, Object owner, String error) {
        this.owner = owner;
        this.details = error;
    }

    public String getDetail() {
        return details;
    }

    public static class Severity {
        int severity;

        public Severity(int i) {
            severity = i;
        }
    }
}
